package com.tietiao.common.constants;

import com.tietiao.common.bean.ThreadLocalBean;

public class SystemContext {
	private static ThreadLocal<ThreadLocalBean> threadLocalBean = new ThreadLocal<ThreadLocalBean>();
	
	public static void setThreadLocalBean(ThreadLocalBean _threadLocalBean){
		threadLocalBean.set(_threadLocalBean);
	}
	
	public static ThreadLocalBean getThreadLocalBean(){
		ThreadLocalBean _threadLocalBean = (ThreadLocalBean)threadLocalBean.get();
		if(threadLocalBean == null){
			return null;
		}else{
			return _threadLocalBean;
		}
	}
	
	public static void removeThreadLocalBean(){
		threadLocalBean.remove();
	}
}
